#include "particle.hh"
#include "gl.hh"
#include <utility>

namespace gl
{
	void particle::update(float step)
	{
		std::swap(position, last_position);
		position = last_position*2.0f - position + a*(step*step);
		if (age < life) age++;
	}
}

